/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 亮色模式变量 */
  --bg-color: #f0f2f5;
  --text-color: rgba(0, 0, 0, 0.85);
  --card-bg: #ffffff;
  --border-color: #f0f0f0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --header-bg: #ffffff;
  --primary-color: #1677ff;
}

/* 深色模式变量 */
html[data-theme='dark'] {
  --bg-color: #121212;
  --text-color: rgba(255, 255, 255, 0.85);
  --card-bg: #1f1f1f;
  --border-color: #303030;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --header-bg: #1f1f1f;
  --primary-color: #177ddc;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s, color 0.3s;
}

/* 加载组件样式 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
}

.loading-spinner {
  font-size: 18px;
  padding: 20px;
  text-align: center;
  background: var(--card-bg);
  border-radius: 4px;
  box-shadow: 0 2px 8px var(--shadow-color);
}

/* 管理后台样式 */
.admin-layout {
  min-height: 100vh;
}

.admin-header {
  background: var(--header-bg);
  padding: 0 24px;
  box-shadow: 0 1px 4px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-content {
  margin: 24px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: 4px;
}

.admin-footer {
  text-align: center;
  padding: 16px 50px;
}

/* 通用样式 */
.page-title {
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 500;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* 登录页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-form {
  width: 350px;
  padding: 30px;
  background: var(--card-bg);
  border-radius: 4px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.App {
  text-align: center;
}

.App-logo {
  height: 40vmin;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .App-logo {
    animation: App-logo-spin infinite 20s linear;
  }
}

.App-header {
  background-color: #282c34;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 2vmin);
  color: white;
}

.App-link {
  color: #61dafb;
}

@keyframes App-logo-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}